import request from '@/utils/request'
//药品库接口


export function druglist( query ) {
  return request({
    url: '/system/drug/list',
    method: 'get',
    params:query
  })
}
// 下载用户导入模板
export function importTemplate() {
  return request({
    url: '/system/drug/importTemplate',
    method: 'get'
  })
}
// 详情
export function getDetail( id ) {
  return request({
    url: '/system/drug/'+id,
    method: 'get'
  })
}

//
export function addDrug(data) {
  return request({
    url: '/system/drug',
    method: 'post',
    data: data
  })
}

//
export function updateDrug(data) {
  return request({
    url: '/system/drug',
    method: 'put',
    data: data
  })
}


// 删除
export function delDrug(ids) {
  return request({
    url: '/system/drug/'+ids,
    method: 'delete'
  })
}


